<template>
  <div>
    子组件
    {{ name }}
    <p @click="btn" style="background: pink">按钮</p>
  </div>
</template>

<script>
export default {
  // props: ['name'],
  props: {
    name: {
      type: String,
      default: '12345'
    }
  },
  created () {
    console.log(this.name, 'name')
  },
  methods: {
    btn () {
      this.$emit('getDataList', '12580')
    }
  }
}
</script>

<style></style>
